import React from 'react'
import { RadioGroup, Button, Link,  Input, Switch, Checkbox } from '../../../ui-components'
import BaseEdit, { Base } from './BaseEdit'
import BasePreview from './BasePreview'
import style from './style.shortText'

class Edit extends Base {
	render() {
		return (
			<BaseEdit 
				{...this.props} 
				update={::this.update}/>
		)
	}
}

class Preview extends React.Component {
	render() {
		return (
			<BasePreview>
				<div className={style.preview}>
					<div className={style.row}>
						<p>未点击</p>
						<Input width={250} label={this.props.labelValue || '单行文本'}/>
					</div>
					<div className={style.row}>
						<p>点击</p>
						<Input width={250} autoFocus label={this.props.labelValue || '单行文本'} value='示例文本'/>
					</div>
				</div>
			</BasePreview>
		)
	}
}

export default {
	Edit,
	Preview
}
